import React, {lazy} from "react";
import {Routes,Route,HashRouter } from "react-router-dom";
import {routers} from './routers.ts'

export default function App() {
    return (
        <HashRouter>
            <Routes>
                {
                    routers.map(item => {
                        const {element:Component} =  item
                        return (
                            <Route key={item.path} path={item.path} element={<Component/>}/>
                        )
                    })
                }
            </Routes>
        </HashRouter>
    )
}